package com.chinacoal.microservice.impl.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.plugins.Page;
import com.chinacoal.microservice.model.wofkflow.ApproveParam;
import com.chinacoal.microservice.model.wofkflow.QueryTaskListParam;
import com.chinacoal.microservice.model.wofkflow.entity.InstanceEntity;
import com.chinacoal.microservice.model.wofkflow.entity.WorkItemEntity;
import com.eos.workflow.api.IBPSServiceClient;

/**  
 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService
 * @ClassName: WorkFlowService
 * @ClassDesc: 工作流管理Service
 * @Createby: sunh
 * @CreatedDate: 2019-12-02 13:06:22
 */  
public interface WorkFlowService{
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.getIBPSServiceClient
	 * @MethodName: getIBPSServiceClient
	 * @MethodDesc: 获取工作流服务
	 * @ParamList: {
	 *				 @param userId
	 *				 @param name
	 *			   }
	 * @Return: IBPSServiceClient
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-02 13:06:02
	 */ 
	public IBPSServiceClient getIBPSServiceClient(Integer userId, String name) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.setBusinessDate
	 * @MethodName: setBusinessDate
	 * @MethodDesc: 保存业务数据
	 * @ParamList: {
	 *				 @param client
	 *				 @param instanceId
	 *				 @param businessParam
	 *			   }
	 * @Return: boolean
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-02 13:10:16
	 */ 
	public boolean setBusinessDate(IBPSServiceClient client,Long instanceId, Map<String,Object> businessParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.getBusinessDate
	 * @MethodName: getBusinessDate
	 * @MethodDesc: 获取业务数据
	 * @ParamList: {
	 *				 @param client
	 *				 @param instanceId
	 *				 @param name
	 *			   }
	 * @Return: String
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-18 17:29:04
	 */ 
	public String getBusinessDate(IBPSServiceClient client,Long instanceId, String name) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.createProcessInstance
	 * @MethodName: createProcessInstance
	 * @MethodDesc: 创建流程实例
	 * @ParamList: {
	 *				 @param client
	 *				 @param processCode
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-08 15:38:52
	 */ 
	public InstanceEntity createProcessInstance(IBPSServiceClient client, String processCode) throws Exception;

	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.processSubmit
	 * @MethodName: processSubmit
	 * @MethodDesc: 启动流程
	 * @ParamList: {
	 *				 @param client
	 *				 @param instanceId
	 *				 @param businessParam
	 *				 @return
	 *				 @throws Exception
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-08 16:02:49
	 */ 
	public InstanceEntity processSubmit(IBPSServiceClient client, Long instanceId, Map<String, Object> businessParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.completeFill
	 * @MethodName: completeFill
	 * @MethodDesc: 完成待办--填报
	 * @ParamList: {
	 *				 @param client
	 *				 @param instanceId
	 *			   }
	 * @Return: boolean
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-08 17:37:00
	 */ 
	public boolean completeFill(IBPSServiceClient client, Long instanceId) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveAgreed
	 * @MethodName: approveAgreed
	 * @MethodDesc: 完成待办--同意
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *				 @return
	 *				 @throws Exception
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:48:49
	 */ 
	public InstanceEntity approveAgreed(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveRejected
	 * @MethodName: approveRejected
	 * @MethodDesc: 完成待办--流程驳回
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:48:37
	 */ 
	public InstanceEntity approveRejected(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	 
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveRecall
	 * @MethodName: approveRecall
	 * @MethodDesc: 完成待办--流程撤回
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:48:27
	 */ 
	public InstanceEntity approveRecall(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	 
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveFallback
	 * @MethodName: approveFallback
	 * @MethodDesc: 完成待办--流程回退
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:48:10
	 */ 
	public InstanceEntity approveFallback(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
  
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveConsult
	 * @MethodName: approveConsult
	 * @MethodDesc: 完成待办--意见征询
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:47:58
	 */ 
	public InstanceEntity approveConsult(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveDelegate
	 * @MethodName: approveDelegate
	 * @MethodDesc: 完成待办--委托审批
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:47:46
	 */ 
	public InstanceEntity approveDelegate(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	 
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveTranspond
	 * @MethodName: approveTranspond
	 * @MethodDesc: 完成待办--待办转发
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:47:29
	 */ 
	public InstanceEntity approveTranspond(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveRepeal
	 * @MethodName: approveRepeal
	 * @MethodDesc: 完成待办--撤销审批
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:47:17
	 */ 
	public InstanceEntity approveRepeal(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveTerminate
	 * @MethodName: approveTerminate
	 * @MethodDesc: 完成待办--终止流程
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:47:04
	 */ 
	public InstanceEntity approveTerminate(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveRestart
	 * @MethodName: approveRestart
	 * @MethodDesc: 完成待办--流程重启
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:46:57
	 */ 
	public InstanceEntity approveRestart(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveHangUp
	 * @MethodName: approveHangUp
	 * @MethodDesc: 完成待办--流程挂起
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:46:37
	 */ 
	public InstanceEntity approveHangUp(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.approveRestore
	 * @MethodName: approveRestore
	 * @MethodDesc: 完成待办--流程恢复
	 * @ParamList: {
	 *				 @param client
	 *				 @param approveParam
	 *			   }
	 * @Return: InstanceEntity
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:46:25
	 */ 
	public InstanceEntity approveRestore(IBPSServiceClient client, ApproveParam approveParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.deleteInstanceById
	 * @MethodName: deleteInstanceById
	 * @MethodDesc: 根据实例id删除流程实例
	 * @ParamList: {
	 *				 @param client
	 *				 @param instanceIds
	 *			   }
	 * @Return: void
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:46:08
	 */ 
	public void deleteInstanceById(IBPSServiceClient client, List<Long> instanceIds) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.getTaskList
	 * @MethodName: getTaskList
	 * @MethodDesc: 查询待办列表
	 * @ParamList: {
	 *				 @param page
	 *				 @param pageSize
	 *				 @param queryParam
	 *			   }
	 * @Return: Page<WorkItemEntity>
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:45:53
	 */ 
	public Page<WorkItemEntity> getTaskList(Integer page, Integer pageSize, QueryTaskListParam queryParam) throws Exception;
	
	/**  
	 * @Package: com.chinacoal.microservice.impl.service.WorkFlowService.getAchTaskList
	 * @MethodName: getAchTaskList
	 * @MethodDesc: 查询已办列表
	 * @ParamList: {
	 *				 @param page
	 *				 @param pageSize
	 *				 @param queryParam
	 *			   }
	 * @Return: Page<WorkItemEntity>
	 * @Createby: sunh
	 * @CreatedDate: 2019-12-03 14:45:34
	 */ 
	public Page<WorkItemEntity> getAchTaskList(Integer page, Integer pageSize, QueryTaskListParam queryParam) throws Exception;
}
